package com.gzhryc.shared_device.oem.code.agent.dao.db;

import com.gzhryc.common.NumberTools;
import com.gzhryc.jdbc.annotaion.Column;
import com.gzhryc.jdbc.annotaion.DateBranchTable;
import com.gzhryc.jdbc.annotaion.Id;
import com.gzhryc.jdbc.annotaion.Table;
import com.gzhryc.jdbc.enums.DateBranchTableType;
import com.gzhryc.shared_device.base.enums.WalletOperateEnum;

import java.io.Serializable;
import java.util.Date;

@DateBranchTable(type = DateBranchTableType.month)
@Table(name = "agent_relation_wallet_operate")
public class AgentRelationWalletOperate implements Serializable {

    private static final long serialVersionUID = 1L;

	@Id
    protected Long id;

    @Column(name = "user_id", notNull = true)
    protected Long userId;

    @Column(name = "relation_user_id", notNull = true, note = "关联用户ID")
    protected Long relationUserId;

    @Column(name = "account_group_id", notNull = true, note = "账号组ID")
    protected Long accountGroupId;

    @Column(notNull = true, note = "操作的金额")
    protected Long money;

    @Column(name = "money_type", notNull = true, note = "操作金额的类型，余额，提现金额，冻结余额")
    protected Integer moneyType;

    @Column(notNull = true, note = "操作类型，增加或减少，提现")
    protected Integer type;

    @Column(notNull = true, name = "operator_type", note = "操作用户的类型")
    protected Integer operatorType;

    @Column(name = "operator_type_name", note = "操作用户的类型名称")
    protected String operatorTypeName;

    @Column(name = "operator", note = "操作用户")
    protected String operator;

    @Column(name = "operate_note", length = 255, note = "操作说明")
    protected String operateNote;

    @Column(name = "create_date", notNull = true, note = "操作时间")
    protected Date createDate;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getRelationUserId() {
        return relationUserId;
    }

    public void setRelationUserId(Long relationUserId) {
        this.relationUserId = relationUserId;
    }

    public Long getAccountGroupId() {
        return accountGroupId;
    }

    public void setAccountGroupId(Long accountGroupId) {
        this.accountGroupId = accountGroupId;
    }

    public Long getMoney() {
        return money;
    }

    public void setMoney(Long money) {
        this.money = money;
    }

    public Integer getMoneyType() {
        return moneyType;
    }

    public void setMoneyType(Integer moneyType) {
        this.moneyType = moneyType;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Integer getOperatorType() {
        return operatorType;
    }

    public void setOperatorType(Integer operatorType) {
        this.operatorType = operatorType;
    }

    public String getOperatorTypeName() {
        return operatorTypeName;
    }

    public void setOperatorTypeName(String operatorTypeName) {
        this.operatorTypeName = operatorTypeName;
    }

    public String getOperator() {
        return operator;
    }

    public void setOperator(String operator) {
        this.operator = operator;
    }

    public String getOperateNote() {
        return operateNote;
    }

    public void setOperateNote(String operateNote) {
        this.operateNote = operateNote;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }
    
    public String getTypeName(){
        return WalletOperateEnum.Type.note(this.type);
    }

    public String getMoneyTypeName(){
        return WalletOperateEnum.MoneyType.note(this.moneyType);
    }
    
    public String getMoneyStr() {
    	return NumberTools.getMoneyLiStr(this.money);
    }
}
